Optimal. Leaf size=306 \[ \frac {b \left (6 a^2 (4 A+3 C)+b^2 (6 A+5 C)\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {\left (2 a^2 C+5 b^2 (6 A+5 C)\right ) \tan (c+d x) (a+b \sec (c+d x))^3}{120 b^2 d}+\frac {a \left (2 a^2 C+30 A b^2+21 b^2 C\right ) \tan (c+d x) (a+b \sec (c+d x))^2}{120 b^2 d}+\frac {a \left (2 a^4 C+a^2 b^2 (30 A+17 C)+24 b^4 (5 A+4 C)\right ) \tan (c+d x)}{60 b^2 d}+\frac {\left (4 a^4 C+12 a^2 b^2 (5 A+3 C)+15 b^4 (6 A+5 C)\right ) \tan (c+d x) \sec (c+d x)}{240 b d}-\frac {a C \tan (c+d x) (a+b \sec (c+d x))^4}{15 b^2 d}+\frac {C \tan (c+d x) \sec (c+d x) (a+b \sec (c+d x))^4}{6 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.72, antiderivative size = 306, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.242, Rules used = {4093, 4082, 4002, 3997, 3787, 3770, 3767, 8} \[ \frac {a \left (a^2 b^2 (30 A+17 C)+2 a^4 C+24 b^4 (5 A+4 C)\right ) \tan (c+d x)}{60 b^2 d}+\frac {b \left (6 a^2 (4 A+3 C)+b^2 (6 A+5 C)\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {\left (2 a^2 C+5 b^2 (6 A+5 C)\right ) \tan (c+d x) (a+b \sec (c+d x))^3}{120 b^2 d}+\frac {a \left (2 a^2 C+30 A b^2+21 b^2 C\right ) \tan (c+d x) (a+b \sec (c+d x))^2}{120 b^2 d}+\frac {\left (12 a^2 b^2 (5 A+3 C)+4 a^4 C+15 b^4 (6 A+5 C)\right ) \tan (c+d x) \sec (c+d x)}{240 b d}-\frac {a C \tan (c+d x) (a+b \sec (c+d x))^4}{15 b^2 d}+\frac {C \tan (c+d x) \sec (c+d x) (a+b \sec (c+d x))^4}{6 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3767
Rule 3770
Rule 3787
Rule 3997
Rule 4002
Rule 4082
Rule 4093
Rubi steps
\begin {align*} \int \sec ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {C \sec (c+d x) (a+b \sec (c+d x))^4 \tan (c+d x)}{6 b d}+\frac {\int \sec (c+d x) (a+b \sec (c+d x))^3 \left (a C+b (6 A+5 C) \sec (c+d x)-2 a C \sec ^2(c+d x)\right ) \, dx}{6 b}\\ &=-\frac {a C (a+b \sec (c+d x))^4 \tan (c+d x)}{15 b^2 d}+\frac {C \sec (c+d x) (a+b \sec (c+d x))^4 \tan (c+d x)}{6 b d}+\frac {\int \sec (c+d x) (a+b \sec (c+d x))^3 \left (-3 a b C+\left (2 a^2 C+5 b^2 (6 A+5 C)\right ) \sec (c+d x)\right ) \, dx}{30 b^2}\\ &=\frac {\left (2 a^2 C+5 b^2 (6 A+5 C)\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b^2 d}-\frac {a C (a+b \sec (c+d x))^4 \tan (c+d x)}{15 b^2 d}+\frac {C \sec (c+d x) (a+b \sec (c+d x))^4 \tan (c+d x)}{6 b d}+\frac {\int \sec (c+d x) (a+b \sec (c+d x))^2 \left (3 b \left (30 A b^2-2 a^2 C+25 b^2 C\right )+3 a \left (30 A b^2+2 a^2 C+21 b^2 C\right ) \sec (c+d x)\right ) \, dx}{120 b^2}\\ &=\frac {a \left (30 A b^2+2 a^2 C+21 b^2 C\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{120 b^2 d}+\frac {\left (2 a^2 C+5 b^2 (6 A+5 C)\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b^2 d}-\frac {a C (a+b \sec (c+d x))^4 \tan (c+d x)}{15 b^2 d}+\frac {C \sec (c+d x) (a+b \sec (c+d x))^4 \tan (c+d x)}{6 b d}+\frac {\int \sec (c+d x) (a+b \sec (c+d x)) \left (-3 a b \left (2 a^2 C-3 b^2 (50 A+39 C)\right )+3 \left (4 a^4 C+12 a^2 b^2 (5 A+3 C)+15 b^4 (6 A+5 C)\right ) \sec (c+d x)\right ) \, dx}{360 b^2}\\ &=\frac {\left (4 a^4 C+12 a^2 b^2 (5 A+3 C)+15 b^4 (6 A+5 C)\right ) \sec (c+d x) \tan (c+d x)}{240 b d}+\frac {a \left (30 A b^2+2 a^2 C+21 b^2 C\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{120 b^2 d}+\frac {\left (2 a^2 C+5 b^2 (6 A+5 C)\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b^2 d}-\frac {a C (a+b \sec (c+d x))^4 \tan (c+d x)}{15 b^2 d}+\frac {C \sec (c+d x) (a+b \sec (c+d x))^4 \tan (c+d x)}{6 b d}+\frac {\int \sec (c+d x) \left (45 b^3 \left (6 a^2 (4 A+3 C)+b^2 (6 A+5 C)\right )+12 a \left (2 a^4 C+24 b^4 (5 A+4 C)+a^2 b^2 (30 A+17 C)\right ) \sec (c+d x)\right ) \, dx}{720 b^2}\\ &=\frac {\left (4 a^4 C+12 a^2 b^2 (5 A+3 C)+15 b^4 (6 A+5 C)\right ) \sec (c+d x) \tan (c+d x)}{240 b d}+\frac {a \left (30 A b^2+2 a^2 C+21 b^2 C\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{120 b^2 d}+\frac {\left (2 a^2 C+5 b^2 (6 A+5 C)\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b^2 d}-\frac {a C (a+b \sec (c+d x))^4 \tan (c+d x)}{15 b^2 d}+\frac {C \sec (c+d x) (a+b \sec (c+d x))^4 \tan (c+d x)}{6 b d}+\frac {1}{16} \left (b \left (6 a^2 (4 A+3 C)+b^2 (6 A+5 C)\right )\right ) \int \sec (c+d x) \, dx+\frac {\left (a \left (2 a^4 C+24 b^4 (5 A+4 C)+a^2 b^2 (30 A+17 C)\right )\right ) \int \sec ^2(c+d x) \, dx}{60 b^2}\\ &=\frac {b \left (6 a^2 (4 A+3 C)+b^2 (6 A+5 C)\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {\left (4 a^4 C+12 a^2 b^2 (5 A+3 C)+15 b^4 (6 A+5 C)\right ) \sec (c+d x) \tan (c+d x)}{240 b d}+\frac {a \left (30 A b^2+2 a^2 C+21 b^2 C\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{120 b^2 d}+\frac {\left (2 a^2 C+5 b^2 (6 A+5 C)\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b^2 d}-\frac {a C (a+b \sec (c+d x))^4 \tan (c+d x)}{15 b^2 d}+\frac {C \sec (c+d x) (a+b \sec (c+d x))^4 \tan (c+d x)}{6 b d}-\frac {\left (a \left (2 a^4 C+24 b^4 (5 A+4 C)+a^2 b^2 (30 A+17 C)\right )\right ) \operatorname {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{60 b^2 d}\\ &=\frac {b \left (6 a^2 (4 A+3 C)+b^2 (6 A+5 C)\right ) \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {a \left (2 a^4 C+24 b^4 (5 A+4 C)+a^2 b^2 (30 A+17 C)\right ) \tan (c+d x)}{60 b^2 d}+\frac {\left (4 a^4 C+12 a^2 b^2 (5 A+3 C)+15 b^4 (6 A+5 C)\right ) \sec (c+d x) \tan (c+d x)}{240 b d}+\frac {a \left (30 A b^2+2 a^2 C+21 b^2 C\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{120 b^2 d}+\frac {\left (2 a^2 C+5 b^2 (6 A+5 C)\right ) (a+b \sec (c+d x))^3 \tan (c+d x)}{120 b^2 d}-\frac {a C (a+b \sec (c+d x))^4 \tan (c+d x)}{15 b^2 d}+\frac {C \sec (c+d x) (a+b \sec (c+d x))^4 \tan (c+d x)}{6 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 3.65, size = 407, normalized size = 1.33 \[ \frac {\sec ^6(c+d x) \left (A \cos ^2(c+d x)+C\right ) \left (2 \sin (c+d x) \left (600 a^3 A \cos (3 (c+d x))+120 a^3 A \cos (5 (c+d x))+560 a^3 C \cos (3 (c+d x))+80 a^3 C \cos (5 (c+d x))+16 a \left (a^2 (75 A+80 C)+24 b^2 (10 A+11 C)\right ) \cos (c+d x)+20 b \left (18 a^2 (4 A+5 C)+5 b^2 (6 A+5 C)\right ) \cos (2 (c+d x))+360 a^2 A b \cos (4 (c+d x))+1080 a^2 A b+270 a^2 b C \cos (4 (c+d x))+1530 a^2 b C+1680 a A b^2 \cos (3 (c+d x))+240 a A b^2 \cos (5 (c+d x))+1344 a b^2 C \cos (3 (c+d x))+192 a b^2 C \cos (5 (c+d x))+90 A b^3 \cos (4 (c+d x))+510 A b^3+75 b^3 C \cos (4 (c+d x))+745 b^3 C\right )-240 b \left (6 a^2 (4 A+3 C)+b^2 (6 A+5 C)\right ) \cos ^6(c+d x) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )\right )}{1920 d (A \cos (2 (c+d x))+A+2 C)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 262, normalized size = 0.86 \[ \frac {15 \, {\left (6 \, {\left (4 \, A + 3 \, C\right )} a^{2} b + {\left (6 \, A + 5 \, C\right )} b^{3}\right )} \cos \left (d x + c\right )^{6} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, {\left (6 \, {\left (4 \, A + 3 \, C\right )} a^{2} b + {\left (6 \, A + 5 \, C\right )} b^{3}\right )} \cos \left (d x + c\right )^{6} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (16 \, {\left (5 \, {\left (3 \, A + 2 \, C\right )} a^{3} + 6 \, {\left (5 \, A + 4 \, C\right )} a b^{2}\right )} \cos \left (d x + c\right )^{5} + 144 \, C a b^{2} \cos \left (d x + c\right ) + 15 \, {\left (6 \, {\left (4 \, A + 3 \, C\right )} a^{2} b + {\left (6 \, A + 5 \, C\right )} b^{3}\right )} \cos \left (d x + c\right )^{4} + 40 \, C b^{3} + 16 \, {\left (5 \, C a^{3} + 3 \, {\left (5 \, A + 4 \, C\right )} a b^{2}\right )} \cos \left (d x + c\right )^{3} + 10 \, {\left (18 \, C a^{2} b + {\left (6 \, A + 5 \, C\right )} b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{480 \, d \cos \left (d x + c\right )^{6}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.35, size = 932, normalized size = 3.05 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 2.24, size = 430, normalized size = 1.41 \[ \frac {A \,a^{3} \tan \left (d x +c \right )}{d}+\frac {2 a^{3} C \tan \left (d x +c \right )}{3 d}+\frac {C \,a^{3} \tan \left (d x +c \right ) \left (\sec ^{2}\left (d x +c \right )\right )}{3 d}+\frac {3 A \,a^{2} b \sec \left (d x +c \right ) \tan \left (d x +c \right )}{2 d}+\frac {3 A \,a^{2} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2 d}+\frac {3 C \,a^{2} b \tan \left (d x +c \right ) \left (\sec ^{3}\left (d x +c \right )\right )}{4 d}+\frac {9 C \,a^{2} b \sec \left (d x +c \right ) \tan \left (d x +c \right )}{8 d}+\frac {9 C \,a^{2} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8 d}+\frac {2 A a \,b^{2} \tan \left (d x +c \right )}{d}+\frac {A a \,b^{2} \tan \left (d x +c \right ) \left (\sec ^{2}\left (d x +c \right )\right )}{d}+\frac {8 C a \,b^{2} \tan \left (d x +c \right )}{5 d}+\frac {3 C a \,b^{2} \tan \left (d x +c \right ) \left (\sec ^{4}\left (d x +c \right )\right )}{5 d}+\frac {4 C a \,b^{2} \tan \left (d x +c \right ) \left (\sec ^{2}\left (d x +c \right )\right )}{5 d}+\frac {A \,b^{3} \tan \left (d x +c \right ) \left (\sec ^{3}\left (d x +c \right )\right )}{4 d}+\frac {3 A \,b^{3} \sec \left (d x +c \right ) \tan \left (d x +c \right )}{8 d}+\frac {3 A \,b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8 d}+\frac {b^{3} C \tan \left (d x +c \right ) \left (\sec ^{5}\left (d x +c \right )\right )}{6 d}+\frac {5 b^{3} C \tan \left (d x +c \right ) \left (\sec ^{3}\left (d x +c \right )\right )}{24 d}+\frac {5 b^{3} C \sec \left (d x +c \right ) \tan \left (d x +c \right )}{16 d}+\frac {5 b^{3} C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.37, size = 386, normalized size = 1.26 \[ \frac {160 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} C a^{3} + 480 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} A a b^{2} + 96 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} C a b^{2} - 5 \, C b^{3} {\left (\frac {2 \, {\left (15 \, \sin \left (d x + c\right )^{5} - 40 \, \sin \left (d x + c\right )^{3} + 33 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} - 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 90 \, C a^{2} b {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 30 \, A b^{3} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 360 \, A a^{2} b {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 480 \, A a^{3} \tan \left (d x + c\right )}{480 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 7.32, size = 574, normalized size = 1.88 \[ \frac {\left (\frac {5\,A\,b^3}{4}-2\,A\,a^3-2\,C\,a^3+\frac {11\,C\,b^3}{8}-6\,A\,a\,b^2+3\,A\,a^2\,b-6\,C\,a\,b^2+\frac {15\,C\,a^2\,b}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+\left (10\,A\,a^3-\frac {7\,A\,b^3}{4}+\frac {22\,C\,a^3}{3}+\frac {5\,C\,b^3}{24}+22\,A\,a\,b^2-9\,A\,a^2\,b+14\,C\,a\,b^2-\frac {21\,C\,a^2\,b}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (\frac {A\,b^3}{2}-20\,A\,a^3-12\,C\,a^3+\frac {15\,C\,b^3}{4}-36\,A\,a\,b^2+6\,A\,a^2\,b-\frac {156\,C\,a\,b^2}{5}+\frac {3\,C\,a^2\,b}{2}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (20\,A\,a^3+\frac {A\,b^3}{2}+12\,C\,a^3+\frac {15\,C\,b^3}{4}+36\,A\,a\,b^2+6\,A\,a^2\,b+\frac {156\,C\,a\,b^2}{5}+\frac {3\,C\,a^2\,b}{2}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {5\,C\,b^3}{24}-\frac {7\,A\,b^3}{4}-\frac {22\,C\,a^3}{3}-10\,A\,a^3-22\,A\,a\,b^2-9\,A\,a^2\,b-14\,C\,a\,b^2-\frac {21\,C\,a^2\,b}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (2\,A\,a^3+\frac {5\,A\,b^3}{4}+2\,C\,a^3+\frac {11\,C\,b^3}{8}+6\,A\,a\,b^2+3\,A\,a^2\,b+6\,C\,a\,b^2+\frac {15\,C\,a^2\,b}{4}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {b\,\mathrm {atanh}\left (\frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (24\,A\,a^2+6\,A\,b^2+18\,C\,a^2+5\,C\,b^2\right )}{4\,\left (\frac {3\,A\,b^3}{2}+\frac {5\,C\,b^3}{4}+6\,A\,a^2\,b+\frac {9\,C\,a^2\,b}{2}\right )}\right )\,\left (24\,A\,a^2+6\,A\,b^2+18\,C\,a^2+5\,C\,b^2\right )}{8\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right )^{3} \sec ^{2}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________